function SrvApiLog(params){ 
	 
}

SrvApiLog.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new SrvApiLog.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new SrvApiLog.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new SrvApiLog.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	
	
	/** 编号 [非空]       **/
	this.salId=function(salId){if(this.proxy)return this.getProxy().salId(salId);  this.put("salId", salId);return this;};
	/** and sal_id is null */
	this.salIdNull=function(){if(this.proxy)return this.getProxy().salIdNull();if(this.get("salIdNot")==null)this.put("salIdNot", "");this.put("salId", null);return this;};
	/** not .... */
	this.salIdNot=function(){if(this.proxy)return this.getProxy().salIdNot();this.put("salIdNot", "not");return this;};
	this.salIdNotNull=function(){if(this.proxy)return this.getProxy().salIdNotNull();this.put("salIdNot", "not");this.put("salId", null);return this;};
	this.salIdNot=function(salId){if(this.proxy)return this.getProxy().salIdNot(salId);this.put("salIdNot", "not");this.put("salId", salId);return this;};
		
	/** and sal_id <= ? */
	this.salIdMin=function(min){if(this.proxy)return this.getProxy().salIdMin(min);this.put("salIdMin", min);return this;};
	/** and sal_id >= ? */
	this.salIdMax=function(max){if(this.proxy)return this.getProxy().salIdMax(max);this.put("salIdMax", max);return this;};
		
		
	this.salIdIn=function(ids){
		if(this.proxy)return this.getProxy().salIdIn(ids);  this.put("salIdIn", ids);return this;
	};	
		 
	
	
	/** 调用应用 [非空] [SrvApiClient]      **/
	this.salClient=function(salClient){if(this.proxy)return this.getProxy().salClient(salClient);  this.put("salClient", salClient);return this;};
	/** and sal_client is null */
	this.salClientNull=function(){if(this.proxy)return this.getProxy().salClientNull();if(this.get("salClientNot")==null)this.put("salClientNot", "");this.put("salClient", null);return this;};
	/** not .... */
	this.salClientNot=function(){if(this.proxy)return this.getProxy().salClientNot();this.put("salClientNot", "not");return this;};
	this.salClientNotNull=function(){if(this.proxy)return this.getProxy().salClientNotNull();this.put("salClientNot", "not");this.put("salClient", null);return this;};
	this.salClientNot=function(salClient){if(this.proxy)return this.getProxy().salClientNot(salClient);this.put("salClientNot", "not");this.put("salClient", salClient);return this;};
		
		
	this.salClientIn=function(ids){
		if(this.proxy)return this.getProxy().salClientIn(ids);  this.put("salClientIn", ids);return this;
	};	
		 
	
	
	/** 调用API [非空] [SrvApi]     select * from srv_api where 1=1 **/
	this.salApi=function(salApi){if(this.proxy)return this.getProxy().salApi(salApi);  this.put("salApi", salApi);return this;};
	/** and sal_api is null */
	this.salApiNull=function(){if(this.proxy)return this.getProxy().salApiNull();if(this.get("salApiNot")==null)this.put("salApiNot", "");this.put("salApi", null);return this;};
	/** not .... */
	this.salApiNot=function(){if(this.proxy)return this.getProxy().salApiNot();this.put("salApiNot", "not");return this;};
	this.salApiNotNull=function(){if(this.proxy)return this.getProxy().salApiNotNull();this.put("salApiNot", "not");this.put("salApi", null);return this;};
	this.salApiNot=function(salApi){if(this.proxy)return this.getProxy().salApiNot(salApi);this.put("salApiNot", "not");this.put("salApi", salApi);return this;};
		
		 
	
	
	/** 调用参数 [非空]       **/
	this.salParams=function(salParams){if(this.proxy)return this.getProxy().salParams(salParams);  this.put("salParams", salParams);return this;};
	/** and sal_params is null */
	this.salParamsNull=function(){if(this.proxy)return this.getProxy().salParamsNull();if(this.get("salParamsNot")==null)this.put("salParamsNot", "");this.put("salParams", null);return this;};
	/** not .... */
	this.salParamsNot=function(){if(this.proxy)return this.getProxy().salParamsNot();this.put("salParamsNot", "not");return this;};
	this.salParamsNotNull=function(){if(this.proxy)return this.getProxy().salParamsNotNull();this.put("salParamsNot", "not");this.put("salParams", null);return this;};
	this.salParamsNot=function(salParams){if(this.proxy)return this.getProxy().salParamsNot(salParams);this.put("salParamsNot", "not");this.put("salParams", salParams);return this;};
		
		 
	
	
	/** 返回数据 [非空]       **/
	this.salReturn=function(salReturn){if(this.proxy)return this.getProxy().salReturn(salReturn);  this.put("salReturn", salReturn);return this;};
	/** and sal_return is null */
	this.salReturnNull=function(){if(this.proxy)return this.getProxy().salReturnNull();if(this.get("salReturnNot")==null)this.put("salReturnNot", "");this.put("salReturn", null);return this;};
	/** not .... */
	this.salReturnNot=function(){if(this.proxy)return this.getProxy().salReturnNot();this.put("salReturnNot", "not");return this;};
	this.salReturnNotNull=function(){if(this.proxy)return this.getProxy().salReturnNotNull();this.put("salReturnNot", "not");this.put("salReturn", null);return this;};
	this.salReturnNot=function(salReturn){if(this.proxy)return this.getProxy().salReturnNot(salReturn);this.put("salReturnNot", "not");this.put("salReturn", salReturn);return this;};
		
		 
	
	
	/** 添加时间 [非空]       **/
	this.salInvokeTime=function(salInvokeTime){if(this.proxy)return this.getProxy().salInvokeTime(salInvokeTime);  this.put("salInvokeTime", salInvokeTime);return this;};
	/** and sal_invoke_time is null */
	this.salInvokeTimeNull=function(){if(this.proxy)return this.getProxy().salInvokeTimeNull();if(this.get("salInvokeTimeNot")==null)this.put("salInvokeTimeNot", "");this.put("salInvokeTime", null);return this;};
	/** not .... */
	this.salInvokeTimeNot=function(){if(this.proxy)return this.getProxy().salInvokeTimeNot();this.put("salInvokeTimeNot", "not");return this;};
	this.salInvokeTimeNotNull=function(){if(this.proxy)return this.getProxy().salInvokeTimeNotNull();this.put("salInvokeTimeNot", "not");this.put("salInvokeTime", null);return this;};
	this.salInvokeTimeNot=function(salInvokeTime){if(this.proxy)return this.getProxy().salInvokeTimeNot(salInvokeTime);this.put("salInvokeTimeNot", "not");this.put("salInvokeTime", salInvokeTime);return this;};
		
	/** and sal_invoke_time >= ? */
	this.salInvokeTimeStart=function(start){if(this.proxy)return this.getProxy().salInvokeTimeStart(start);this.put("salInvokeTimeStart", start);return this;};			
	/** and sal_invoke_time <= ? */
	this.salInvokeTimeEnd=function(end){if(this.proxy)return this.getProxy().salInvokeTimeEnd(end);this.put("salInvokeTimeEnd", end);return this;};
		
		 
	
	
	/** 状态 [非空]   1:默认     **/
	this.salStatus=function(salStatus){if(this.proxy)return this.getProxy().salStatus(salStatus);  this.put("salStatus", salStatus);return this;};
	/** and sal_status is null */
	this.salStatusNull=function(){if(this.proxy)return this.getProxy().salStatusNull();if(this.get("salStatusNot")==null)this.put("salStatusNot", "");this.put("salStatus", null);return this;};
	/** not .... */
	this.salStatusNot=function(){if(this.proxy)return this.getProxy().salStatusNot();this.put("salStatusNot", "not");return this;};
	this.salStatusNotNull=function(){if(this.proxy)return this.getProxy().salStatusNotNull();this.put("salStatusNot", "not");this.put("salStatus", null);return this;};
	this.salStatusNot=function(salStatus){if(this.proxy)return this.getProxy().salStatusNot(salStatus);this.put("salStatusNot", "not");this.put("salStatus", salStatus);return this;};
		
		
	this.salStatusIn=function(ids){
		if(this.proxy)return this.getProxy().salStatusIn(ids);  this.put("salStatusIn", ids);return this;
	};	
		 
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有API日志 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/api/apilog.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取API日志分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/api/apilog.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取API日志 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/api/apilog.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

SrvApiLog.get = function(id){
	var protocol = ux.ajax("/admin/api/apilog.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.srvApiLog;
	return null;
}

SrvApiLog.where = new SrvApiLog.Where(0,true);